import javax.swing.JFrame;
import javax.swing.JOptionPane;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;

import com.delphi.tcde.plug.editor.GraphEditor;
import com.delphi.tcde.plug.model.Graph;


public class MakeSearch implements IWorkbenchWindowActionDelegate {
	
	Graph sGr = new Graph();
	
	@Override
	public void run(IAction action) {
		Shell shell = Display.getDefault().getActiveShell();
		sGr = GraphEditor.gg();
		sGr.bfs();
		MessageBox msg = new MessageBox(shell);
		msg.setMessage(sGr.getAnswer());
	    msg.open();
	  }

	@Override
	public void selectionChanged(IAction action, ISelection selection) {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

	@Override
	public void init(IWorkbenchWindow window) {
		// TODO Auto-generated method stub

	}

}
